package 字符串类题目;

/**
 * @author zc
 * @version 1.0
 * @date 2021/9/2 17:43
 */
public class Demo8 {
    public static void main(String[] args) {
        //String str = " hell\n o ";
        String str = " hell o ";
        System.out.println(str);
        System.out.println("去除所有的空格后");
        String str2 = str.replaceAll(" ", "");
        System.out.println(str2);
    }
}
